package com.javastudy.autowiredStudy.projectBootStudy;

import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.stereotype.Component;

import javax.annotation.Priority;

/**
 * 项目启动时可以实现一些初始化工作
 * @author mac
 * @date 2021/9/9 6:15 下午
 */
@Component
@Priority(1)
public class MyApplicationRunner implements ApplicationRunner {
    @Override
    public void run(ApplicationArguments args) throws Exception {
        //实现加载系统参数、初始化、缓存预热等操作

    }
}
